1 using System;
2 using
System.Collections.Generic;
3 using
System.ComponentModel;
4 using
System.Drawing;
5 using
System.Data;
6 using
System.Linq;
7 using
System.Text;
8 using
System.Threading.Tasks;
9 using
System.Windows.Forms;
10
11 namespace
SoftQuanLyNhaHang.Controllers
12 {
13     
class BomCtrl
14     {
15
16         
// Method Add
17         
public static int InsertBom(int _IdBom, string _TieuDe, float _SoLuong, DateTime _NgayBatDau, DateTime _NgayKetThuc, double _GiaVon, double _GiaBan, string _TrangThai, string _MoTa, DateTime _NgayTao)
18         {
19             
try
20             {
21                 Models.BomMod bom =
new Models.BomMod( _IdBom , _TieuDe, _SoLuong, _NgayBatDau, _NgayKetThuc, _GiaVon, _GiaBan, _TrangThai, _MoTa, _NgayTao);
22                 
return bom.InsertBom();
23             }
24             
catch
25             {
26                 
return 0;
27             }
28         }
29
30         
public static int UpdateBom(int _IdBom, string _TieuDe, float _SoLuong, DateTime _NgayBatDau, DateTime _NgayKetThuc, double _GiaVon, double _GiaBan, string _TrangThai, string _MoTa, DateTime _NgayTao)
31         {
32             
try
33             {
34                 Models.BomMod bom =
new Models.BomMod(_IdBom, _TieuDe, _SoLuong, _NgayBatDau, _NgayKetThuc, _GiaVon, _GiaBan, _TrangThai, _MoTa, _NgayTao);
35                 
return bom.UpdateBom();
36             }
37             
catch
38             {
39                 
return 0;
40             }
41         }
42
43         
public static int DeleteBom(int _IdBom)
44         {
45             
try
46             {
47                 Models.BomMod bom =
new Models.BomMod(_IdBom);
48                 
return bom.DeleteBom();
49             }
50             
catch
51             {
52                 
return 0;
53             }
54
55         }
56
57         
//lay tat ca danh sach
58         
public static DataSet FillDataSet_getBom_Search(int _IdBom, string _TieuDe, float _SoLuong, DateTime _NgayBatDau, DateTime _NgayKetThuc, double _GiaVon, double _GiaBan, string _TrangThai, string _MoTa, int _PageSize, int _PageIndex, DateTime _NgayHomNay)
59         {
60             
try
61             {
62                 Models.BomMod sp =
new Models.BomMod(_IdBom, _TieuDe, _SoLuong, _NgayBatDau, _NgayKetThuc, _GiaVon, _GiaBan, _TrangThai, _MoTa, _PageSize, _PageIndex, _NgayHomNay);
63                 
return sp.FillDataSet_getBom_Search();
64
65             }
66             
catch
67             {
68                 
return null;
69             }
70         }
71
72         
//lay 1 bom
73         
public static DataSet FillDataSet_getBom_ByIdBom(int _IdBom)
74         {
75             
try
76             {
77                 Models.BomMod sp =
new Models.BomMod(_IdBom);
78                 
return sp.FillDataSet_getBom_ByIdBom();
79             }
80             
catch
81             {
82                 
return null;
83             }
84         }
85     }
86 }


Gõ tìm kiếm nhanh...